#include "tcpsever.hpp"
#include <memory>


void Usege(string argv)
{
    cout << argv << " + local_port" << endl;
}

int main(int args,char* argv[])
{
    EnableCout();
    if(args != 2)
    {
        Usege(argv[0]);
        exit(USEGE_ERROR);
    }
    uint16_t port = stoi(argv[1]);
    unique_ptr<Tcpsever> local = make_unique<Tcpsever>(port);
    local->InitSever();
    local->Loop();
    return 0;
}